package com.atguigu.system.controller;

import com.atguigu.common.result.Result;
import com.atguigu.system.service.OssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author： ekode
 * @Date： 2025/9/26 下午3:04
 * @Describe：
 */
@RestController
@RequestMapping("/admin/system/oss")
public class OssController {

    @Autowired
    private OssService ossService;

/*    @PostMapping("/upload")
    public Result upload(@RequestParam("file") MultipartFile file) {
        try {
            String url = ossService.uploadFile(file, "upload/" + file.getOriginalFilename());
            return Result.ok(url);
        } catch (Exception e) {
            return Result.fail("上传失败");
        }
    }*/
}
